package org.grottarossa.ui.core.controls.deadline;

import java.util.ResourceBundle;

import org.grottarossa.ui.core.ApplicationSession;
import org.grottarossa.ui.core.FormFieldLocation;
import org.grottarossa.ui.core.FormFieldProperties;
import org.grottarossa.ui.core.Notifier;
import org.grottarossa.ui.core.base.BaseForm;

import com.vaadin.ui.Field;
import com.vaadin.ui.GridLayout;


/**
 * Form di selezione data di scadenza
 * @author   
 * @uml.dependency   supplier="org.grottarossa.ui.core.controls.deadline.DeadLinFieldFactory"
 */
public class DeadLineForm extends BaseForm
{
	public DeadLineForm(ApplicationSession appSession, ResourceBundle localizer)
	{
		super(appSession);
		m_layout = new GridLayout(1, 2);
		setLayout(m_layout);

		FormFieldProperties fieldProperties = new FormFieldProperties(new FormFieldLocation(0, 0));
		m_fieldsProperties.put("type", fieldProperties);
		fieldProperties = new FormFieldProperties(new FormFieldLocation(1, 0));
		m_fieldsProperties.put("data", fieldProperties);

		setWriteThrough(true);
		setImmediate(true);
	    setFormFieldFactory(new DeadLinFieldFactory(appSession, localizer));
	}
}
